package org.yaukie.core;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class BaseJob implements Job {
    private static final Logger log = LoggerFactory.getLogger(BaseJob.class);
    private JobExecutionContext context;

    public BaseJob() {
    }

    public final void execute(JobExecutionContext context) throws JobExecutionException {
        try {
            this.context = context;
            this.execute();
        } catch (Exception var3) {
            log.error("job execute error  {}", var3);
        }

    }

    public abstract void execute();

    public JobExecutionContext getContext() {
        return this.context;
    }
}
